'use strict';
var Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.Code = {
    type: String,
    Name: '编码',
    IsUnique: true,
    IsEmpty: false,
    trim: true
};
modelField.Name = {
    type: String,
    Name: '名称',
    IsEmpty: false,
    trim: true
};

modelField.ScanStartTime = {
    type: Date,
    Name: '刷卡开始时间'
};

modelField.StrScanStartTime = {
    type: String
};

modelField.EndTime = {
    type: Date
};

modelField.StartTime = {
    type: Date
};

modelField.StrStartTime = {
    type: String
};

modelField.EndTime = {
    type: Date
};

modelField.StrEndTime = {
    type: String
};

modelField.IsEffective = {
    type: Boolean
};

modelField.Remark = {
    type: String,
    default: '',
    trim: true
};

var newModel = new Model(modelField);
newModel.addIndex({Code: 1, Name: 1});
newModel.create('Shift', '班次');
